﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
using OrbitOne.MailChimp;

namespace MailChimpTestConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var contacts = new List<IMailChimpContact>
                                   {
                                           new DummyContact(new Guid("0D4C6E27-EB89-44B7-8D52-E884B7F39DF8"),
                                                            new Dictionary<string,string>
                                                                {
                                                                        {"First Name", "wim1"},
                                                                        {"Last Name","de coninck"}
                                                                },
                                                            "wimdc@orbitone.com",
                                                            new List<string>{ "Developers" },
                                                            true,
                                                            false),
                                          new DummyContact(new Guid("01D10C7A-B7FB-4198-8A8B-C8C51142997E"),
                                                            new Dictionary<string,string>
                                                                {
                                                                        {"First Name", "Mel"},
                                                                        {"Last Name","Gerats"}
                                                                },
                                                            "mel@orbitone.com",
                                                            new List<string>{"Developers","Chief"},
                                                            true,
                                                            true),
                                          new DummyContact(new Guid("A6A36157-1AF2-4F22-8DDF-CB552432B361"),
                                                            new Dictionary<string,string>
                                                                {
                                                                        {"First Name", "Olivier"},
                                                                        {"Last Name","Mangelschots"}
                                                                },
                                                            "olivier1@orbitone.com",
                                                            new List<string>{"Chief"},
                                                            true,
                                                            true),
                                          /*new DummyContact(new Guid("81443BF3-98AA-4217-B99E-2D4A044E1849"),
                                                           new Dictionary<string,string>
                                                               {
                                                                       {"First Name", "Voicu"},
                                                                       {"Last Name","Mattei"}
                                                               },
                                                           "voicu@orbitone.com",
                                                           new List<string>{"Developers"},
                                                           true,
                                                           true)*/

                                   };
            try
            {
                var chimp = new MailChimp();
                var result = chimp.Update(contacts);
                foreach (var guid in result)
                {
                    Console.WriteLine(guid.ToString());
                }
                Console.ReadLine();
            }
            catch (Exception e)
            {
                Console.Out.WriteLine(e);
                Console.ReadLine();
            }
        }
    }
}
